package com.example.nameserverdemo;

import android.util.Log;

import androidx.annotation.NonNull;

import com.example.nameserverdemo.bean.INameServer;
import com.example.nameserverdemo.bean.SpeedState;

public class NameServer1 implements INameServer {
    private static final String TAG = NameServer1.class.getName();
    private static NameServer1 sInstance = null;

    public static synchronized NameServer1 getInstance(Integer userId, String token) {
        Log.i(TAG, "getInstance: userId: " + userId + ", token: " + token);
        if (sInstance == null) {
            sInstance = new NameServer1();
        }

        return sInstance;
    }

    @NonNull
    @Override
    public SpeedState getSpeed(@NonNull String auth, @NonNull String token) {
        return new SpeedState(100, 30000);
    }
}
